interface IanchorMenu extends ng.IScope {
    toggleAnchor:() => any;
    anchor: (attr:string) => any;
}
function tmsAnchorMenu($location:ng.ILocationService,$anchorScroll:ng.IAnchorScrollService): ng.IDirective{
    return {
        templateUrl:'../src/directives/tms-anchorMenu/tms-anchorMenu.html',
        scope : {},
        transclude: true,
        replace: true,
        restrict: 'E',
        link  : ($scope: IanchorMenu) =>{
           $scope.toggleAnchor = () => {
                $("#anchorCon").toggleClass('hide');
                $("#anchor").toggleClass('anchor-compaction')
           }

           $scope.anchor = (attr) => {
                $location.hash(attr);
                $anchorScroll.yOffset = 1000;   
                $anchorScroll();
           }
        }
    };
}
tmsAnchorMenu['$inject'] = ["$location","$anchorScroll"]
angular.module('tmsAnchormenu', []).directive('tmsAnchormenu', tmsAnchorMenu);






